package com.SouthernWall_404.AgeSuitcase.Common.init;

import com.SouthernWall_404.AgeSuitcase.Common.AgeSuitcase;
import com.SouthernWall_404.AgeSuitcase.Common.world.item.ConstractItem;
import com.SouthernWall_404.AgeSuitcase.Common.world.item.SuitCaseItem;
import com.google.common.collect.Sets;
import net.minecraft.world.item.Item;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

import java.util.LinkedHashSet;
import java.util.function.Supplier;

public class ModItems {


    public static LinkedHashSet<RegistryObject<Item>> CREATIVE_TAB_ITEMS = Sets.newLinkedHashSet();

    public static RegistryObject<Item> registerWithTab(final String name, final Supplier<Item> supplier) {
        RegistryObject<Item> item = ITEMS.register(name, supplier);
        CREATIVE_TAB_ITEMS.add(item);
        return item;
    }

    public static final DeferredRegister<Item> ITEMS=DeferredRegister.create(ForgeRegistries.ITEMS, AgeSuitcase.MODID);

    public static final RegistryObject<Item> SUITCASE_ITEM=registerWithTab("suitcase_item",
            ()->new SuitCaseItem(
                    new Item.Properties()
            ));
    public static final RegistryObject<Item> MISSION_CONSTRACT=registerWithTab("test_constract",
            ()->new ConstractItem(
                    new Item.Properties()
            ));

}
